added support for components to be set via function
refactored smart layout to only happen at startup and to let the app (not sdk) decide tablet/non