Some refactoring, made project Eclipse compatible (hopefully)