Refactored parts; added collections for much more flexibility