The most basic things are now working. The code is still very messy, and not tested enough