Refactored to allow CLI control and removed hardcodings.