Swapping around some code. Closes #36.