Refactored to reusable module; updated all files