Added solutions and fixed a couple bugs.