Clean up code and get layer comp filtering finalized