Fixed parameter order for consistency, updated documentation, fixed const parameter issues