Implemented trading, still needs thorough testing.