Made some changes and cleanup