Added all basic IO functionality

main.c is still present for development purposes