Add an application layer and refine the implementation of the other components