Issue: #4 Marks changes with some minor refactoring to seperate out test cases
Marks history fix - may have missed some things
message with tests, and removed unecessary code
merge in Marks latest fixes
Issue #4: tidy test case a little
Issue #4: fix for '.' at the end of a substring searched for in the history string
Got the LDFLAGS back into C compile line which adds -lm again which seems to matter on ubuntu 13.10
merged with libm
Merged in Jamie code