Finished add layer logic