Several fixes and cleanups

Hi,
 I cleanup the module a little :)

 It works fine but it's better to follow the standard for easy installation and maintenance.

Regards,
  Diego