Compiles, need to fix malloc/rethink things