added flans a some bugfixes
almost done!