Moved system components to their own files and added a simple test