Code overhaul for Guice

restful api not working yet, but Guice is added fix #4