housekeeping: standardised function names to use camel case, updated function headers and removed old un-used code.