Added logging
fixed some things, need to remove some unused code or move over to creatifcubed logger.
Added logging.