Added a few changes and cleanups