fixed classloader to to what it should do
cleaned up path processing and made it more failproof