refactoring to make code more modular and cleaner route handling
working server based version of chatterbox