Refactoring from project PIN #3

Signed-off-by: Youngki Ahn <avej.com@gmail.com>