Added local layout functionality, refactored fetch() method