Eye state detection software

Changed the code for the eye state detection software, implementing
functions for training and the main session, as well as adding a
different training method.