Revert "Merge pull request #13 from sampathLiyanage/bugfixes"

This reverts commit ce0ef0a071a773ef37e26195e0f2d0ff8c606e78, reversing
changes made to f7bd998c64d27b71d29099a58f55f8a5c95bbf31.
Reverted pull request #13 from sampathLiyanage/bugfixes
Reverted pull request #13 from sampathLiyanage/bugfixes
Reverted pull request #13 from sampathLiyanage/bugfixes