Moved toward immutability and removed some unnecessary locks. Also incorporated best practices in terms of style etc.

Lastly, brought the versions of dependencies to something later.
Reverted to Jetty 8 as Jetty 9 requries Java 7