Fix a few issues and clean up a bit more