Added loops
Added pointer incrementation and decrementation
Added IO, removed debug info
Added error handling