ENH: general fixes and added profile example