Solutions for #156, #154, and #139. Changed compliance to Java 1.7