Move the SubForm class to its own file, under lib/ directory.