Cleanup and move towards pedantic/proper testing & code formatting.