Cleaned repeated code and added lvl selector