Fixed the exception raised due to missing components... In general when you refactor (aside from the large planned refactor),  ensure that EVERYTHING WORKS before committing. Also do not be afraid to use the existing infrastructure.