Commit before major rewrite

Changed some stuff already, but now I'm gonna rewrite it to a much
faster and better structure.