Fix variable type to match returned type. No need for type-casting.
Fix unitialized variables.
Merge pull request #125 from jweyrich/master

Fix unitialized variables. Remove unnecessary type-cast.