small changes in wrapper
small changes in main class
major tweaks and cleanups