Finished resourceCalc, debugged the rest