Cleanup and a bugfix related to how required files are organized