Moved owl-JS logic to separate file. Added condition for file sizes.