Started work on the attribute engine, fixed some minor bugs