Cleanup implementation and make code style
consistent.
Version 1.1.0