Cleaning code and fixes.