fix for timezone problem and some clean up