First commit. Need to implement connection detection to prevent
crashing. More refactoring/general cleanup needed.
test commit 2