Misc bug fixes and updates, add graph system, add useful external libraries