Rough init controller and localstorage

awful commit, but meh