Composition

Please can you review? Do not merge yet, i need to do some more commenting and also update the license? not sure how to proceed. I will explain this code more in fully later on.