Fixed layout and conversion routines
Merge pull request #5 from joewood/master

Fixed layout issues