Added head and tail

New functions: head and tail. Removed some commented out detritus.

Normalized all array initialisations to use the long hand