parse dimensions length and width properly and other minor changes