Added "inverted" property and functionality to Layer class.