Make things more testable

Signed-off-by: Ian Macalinao <me@ian.pw>