Added comments, JavaDoc comments and removed some depricated methods