Reformatted libraries

Created a .c file to match each .h file and placed functions into
corresponding .c files