Let's pull the commonality for recompilation into a functions since it's reused three times. Something like...
```erlang
recompile(Type) -> % Type being 'run' or 'test'
  clean_ebin(),
  set_path(),
  compile_resources(),
  compile_src(Type),
  compile_test(Type),
  load_compiled_code().