Essays on dynamic life cycle behavior with heterogeneous agents