Converted the main() method into the constructor.

Signed-off-by: Lucas Arnström <lucasarnstrom@gmail.com>