Various changes... added plugins support and various API changes. NOTHING has been tested. Next commit will fix this