added doc strings and cleaned up underutilized code