In sync with other Storm projects.

Lot of refactoring of the code to make this project in sync with other
Storm projects.