Added a manager class

This commit creates a manager class which is a better way to organize it. It also uses an array for sending instead of a string.