Added license, cleanup, modified printf strings