clean up debugging and clearer documentation