Rename classes, refactor train method and some cleanups