improved the source code structore.