Implemented feedback from @tfounain and refactored the factory namespace and a couple of comments.