[SB,DL] - Refactored files and Added PIN functionality