renaming & making the server in to a class & converting to coffee