Refactoring and a frontend

Bootstrap frontend stuff.