Cleanup and minor changes