Cleanup code and fix init.pp error

Cleanup code and fix init.pp error