WIP: Img layer refactoring