small refactoring, and added config panel that can edit, add/remove targets