CLOUDIFY-1722 refactor code to match code conventions, update to java 1.7