Wrote entire file from scratch including functions for each operation