major changes to everything, still work in progress though