closes #25: Some code cleanup