initial commit. Working version of mainclass