Fixed registration for linux due to case sensitivity
Cleanup and code formatting