Deleted initial tests of functions and re-organized source functions