Refactor code and add feature to use remote BOM

The first commit is a refactoring to simplify the code.
The second commit adds the basic code for using dep management from a remote pom (this code probably needs to be improved along with adding remote plugin management).