fixed syntax bug
gutted old code out.

TODO: crash handler