Few minor code changes.

Cleaned up constructors and added implicit type declarations in
appropriate places.

Fixed exception being thrown in constructor.