Fixed #7, addressed warnings