* WIP * get rid of redundent case and some formatting issues * move some things around for cleaner diffs * remove dead code that does nothing and add connection check * fix whitespace * address feedback