if, ifn and fadelayer implemented + small bug fixes