major refactoring, added motherfungus
change funalloop to ai loop