Fixed haddock issues and prettyfied the documention further.