Basic overhaul - mostly working