Cleanup created code and resolved compiler all warnings