cleanup series I - part I

some basic cleanups as part of #20, mainly:

 - replace spaces with hard tabs (where appropriate)
 - moving docs around
 - delete trailing newlines (where appropriate)