Refactored picoapp