More changes and code clean up