Refactor

Some more documentation