Added powercost and moneycost, some bugfixes