Cleanup, adding setup script, more documentation, and handling case where total resources are more than needed