Fixed some mistakes. Server now working fully.