Cleaned up the code.

This should address the rest of #335.
No need for this line anymore I guess?