Finishing up selected layer. Refactoring border and square size code.