cleaned up code and eliminated all warnings