Added tests for Users, updated Application Test and minor changes to code.