Addressed seg faults on 'empty' input.

Updated comments.

Organized code.

Handled end of input separately.

Updated error checking.

Got username more robustly.

Updated test script to only test what has been implemented thus far.