Masters thesis version 9 Sep 2013