Some works on frontend

How is this different from the original front-end code? Where is the part removing unusable tabs? Is there a way how to reduce the amount of duplicated code?