Added a new costs system (thanks java.util.TreeMap) and fixed a health bug.