Moved most Parse related functions to Parsedb.cs. Did some cleaning and fixing parse errors after move.