fixed annoying typos
fixed file mode
cleanup
bored at work, untested