improved documentation, updated source