Major refactor, fix some bugs, switch to bootstrap