Added main(), updated documentation