removed useless css file
implemented a factory
moved factory to a seperate file