Profile improvements and some fixes