fighting with loading base libraries
fixing a few bugs
added missing files