Keep in mind that switching to a state server most likely will not fix your issues. Your code has a lot of bugs and the bugs should be fixed before moving forward. Also you have not answered any of the clarifying question. It is likely this is an education
issue.