Code cleaning. Almost ready to release (let others in pn development)