Cleanup, small improvements and remove mutual require