FIX: Improved efficiency and added new methods.