Imports and bugs with logging fixed