Added Name Query for finding and sorting table and javadoc
Fixed some bugs. Added javadoc.