Added some debugging stuff and build scripts.