Cleanup, and beginnings of function / class handling