Rebuild the program using class

This version can only log the statment with the input name, maybe i’ll
add more cool functions in the future : )