Essays On Business Cycles And Dynamic Stochastic General Equilibrium Models With Heterogeneous Agents