Either refactoring, tests and stuff

git-svn-id: http://highj.googlecode.com/svn@196 bdcd8b68-9dcc-aa74-f1b9-b4da3e61a8cc