complete refactoring. now this is a true single page app :)