move the point class out of the constructor
define class and class-name to return more appropriate values
split core functions out to separate file