refactored resource generation
added autocomplete controls

for illustration purposes only - it's not actually a good example