fixes bug in alignment operations
adding test for text alignment
converted Text to use TextLayout
cleaned up some edits