tidying up

primitives were moved in their own file
code slightly changed based on jHint suggestions
head change
readme changes