cleanup and added REST endpoints
update for IntelliJ 13