Added State.csv and FunctionStates.hbm.xml. Also fixed stuff in FunctionStates.sql, FunctionState.java and FunctionStateParser.java