Adjusted API file i/o, removed old comments and prints, renamed files, and added more comments.