Make code runnable
Clean code to enable training functionality.