Tidying files

Slightly better organisation of files and much better roxygen comments.