Finally fixes and cleanup