Rewritten to use maven