Setting up main FCS code