Cleaned up test code; added in temp code to demo functionality