KR/Training update.

Added basic training code, renamed a few things.