Major code refactoring

the Kobra frame work is setup for most of its methods