Implemented various changes to the compose method.