Further optimization

Optimized setup files, removed some dependencies, error checking on the
setup directory.