Added namespaces, improved Input, improved performance, some clean up.