Minor additions and bug fixes