Fixed all isues discuss in pull request #15 as of 11/19/14