Refactored working with LP API