Just commiting changes done for #13.

This should fix it, though tests have not been writtten yet. I'm not
closing it unitl actual test is written.