Minor updates to core function.
Moved functions for handling student actions to its own file.
Minor updates to refactoring, after check against reality. A few problems to sort out, on how to declare plugins/components.