Fixes

Made some repairs to the setup scripts, moved lib files into a folder of
their own.