refactoring of library for better responsive grid behavior.