Reviewed code

Two minor things need improvement (added them to the issue tracker). Other than the lack of comments, nice work!