Basic functionality.

Works, but isn't the best solution ever...