Fixed misc bugs, and added CodeHelper.java, for helpful methods. (smartgit is broken)