Refactoring thesis app to use Ajax and bootstrap