Parser improvements and new logging  system