Implementing trading, also possible performance improvements?