Refactoring. Fix #2

Allow to buy multiple at a time
Refactor code