Fixed a bunch of bugs and added rendering, still doesn't work