added moment for better time manipulation, minor cleanup, closes #48