Fixed all bugs. Really ugly looking UI, but it works