refactoring code for better integration with eclipse and floodlight