How do I remove the grey bars that appear after a layer in the timeline?
They show you where the rest the unused part of your clip is relative to your timeline.
So if you used the first 5 seconds of a 10 second clip in a 10 second comp, you would see a greyed-out bar form 5-10 seconds in your comp.
You can drag the edges of your clip out to extend it in your timeline.
To remove them you would need to change the duration of the clips you've created.
A useful function in a pre-comp is &quot;Trim Comp to Work Area&quot; which trims your comp to where your Beginning and End markers are.