Some refactoring and adding a Reload command

Signed-off-by: Lysander <lysandergc@gmail.com>