Fix bugs and make app functional