Changed encoding of workspace, rearranged code and sorted comments.