Basic functionality; bug fixing + code cleanup next