Added relative positioning to placed items

Also cleaned up the patches a bit for (hopefully) easier porting.